package com.ease.component.controls.simplewizard {
   import com.ease.component.interfaces.IWizardPanel;

    public class WizardStep {
        private var _panel:IWizardPanel;
        private var _name:String;
        private var _section:String;
        private var _isSubStep:Boolean;

        public function WizardStep(panel:IWizardPanel, name:String = null,
                                   section:String = null, isSubStep:Boolean = false) {
            this._panel = panel;
            this._name = name;
            this._section = section;
            this._isSubStep = isSubStep;
        }

        public function set panel(arg:IWizardPanel):void {
            this.panel = arg;
        }

        public function get panel():IWizardPanel {
            return this._panel;
        }

        public function get panelId():String {
            return (this._panel != null ? this._panel.panelId : null);
        }

        public function set name(arg:String):void {
            this._name = arg;
        }

        public function get name():String {
            return this._name;
        }

        public function set section(arg:String):void {
            this._section = arg;
        }

        public function get section():String {
            return this._section;
        }

        public function set isSubStep(arg:Boolean):void {
           this._isSubStep = arg;
        }

        public function get isSubStep():Boolean {
           return this._isSubStep;
        }

        private var state:String = "uncompleted"; //completed, uncompleted

        public function clone():WizardStep {
            //todo
            var newObject:WizardStep = new WizardStep(this.panel);
            newObject._name = this._name;
            newObject.state = this.state;
            newObject._section = this._section;
            newObject._isSubStep = this._isSubStep;
            return newObject;
        }
    }
}
